﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Calendar.Logic.Core
{
    static public class EnumHelper
    {
        public static Dictionary<string, string> GetDictionary(Type type)
        {
            return Enum.GetValues(type).Cast<Enum>().ToDictionary(value => Convert.ToInt32(value).ToString(), value => value.ToString().Replace('_', ' '));
        }

        public static string GetValue(Enum value)
        {
            return value.ToString().Replace('_', ' ');
        }
    }
}
